home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / vim-common.postinst < prev    next >
Encoding:
Text File  |  2007-05-22  |  695 b   |  33 lines

  1. #!/bin/bash -e
  2.  
  3. LASTVERSION="1:7.0-017+5"
  4. # Move a conffile without triggering a dpkg question
  5. mv_conffile() {
  6.     OLDCONFFILE="$1"
  7.     NEWCONFFILE="$2"
  8.  
  9.     if [ -e "$OLDCONFFILE" ]; then
  10.         echo "Preserving user changes to $NEWCONFFILE ..."
  11.         mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
  12.         mv -f "$OLDCONFFILE" "$NEWCONFFILE"
  13.     fi
  14. }
  15.  
  16. case "$1" in
  17.   configure)
  18.     if dpkg --compare-versions "$2" le "$LASTVERSION"; then
  19.         mv_conffile "/etc/vim/virc" "/etc/vim/vimrc.tiny"
  20.     fi
  21.     ;;
  22. esac
  23.  
  24. # Automatically added by dh_installmime
  25. if [ "$1" = "configure" ] && [ -x "`which update-mime 2>/dev/null`" ]; then
  26.     update-mime
  27. fi
  28. # End automatically added section
  29.  
  30.  
  31. exit 0
  32.  
  33.